//
//  YKRecommendTagCell.m
//  baisi
//
//  Created by 吴高烽 on 16//Users/Eleven/Documents/ALiCar/ALiCar/ALiCar9/10.
//  Copyright © 2016年 吴高烽. All rights reserved.
//

#import "YKRecommendTagCell.h"
#import <UIImageView+WebCache.h>
@interface YKRecommendTagCell()
@property (weak, nonatomic) IBOutlet UIImageView *imageListView;

@property (weak, nonatomic) IBOutlet UILabel *themeLabel;
@property (weak, nonatomic) IBOutlet UILabel *subLabel;

@end
@implementation YKRecommendTagCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setModel:(YKRcommendTag *)model{
    _model = model ;
    [self.imageListView sd_setImageWithURL:[NSURL URLWithString:model.image_list] placeholderImage:[UIImage imageNamed:@"header_cry_icon"]];
    self.themeLabel.text = model.theme_name;
    if (model.sub_number > 10000) {
        self.subLabel.text = [NSString stringWithFormat:@"%.1f万人订阅",model.sub_number/10000.0];
    }else{
        self.subLabel.text = [NSString stringWithFormat:@"%zd人订阅",model.sub_number];
    }
}
-(void)setFrame:(CGRect)frame{
//    拦截frame
    frame.origin.x = 5;
    frame.size.width -=2*frame.origin.x;
    frame.size.height -= 1;
    [super setFrame:frame];
}
@end
